<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>乳腺癌筛查预约系统</title>

<link href="__PUBLIC__/Mobile/css/form.css" rel="stylesheet" type="text/css">
<style type="text/css">
#bottom_info {position: relative;top: -3.8em;margin: 0 0.5em;padding: .8em 0;text-align: center;background-color: #18c178;color: #ffffff;border: medium hidden;border-radius: 0.1em;box-sizing: border-box;display: none;}
#bottom_info a {width: 100%;text-decoration: none;outline: none;}
#bottom_jump {position: relative;top: -3em;margin: 0 0.5em;padding: .8em 0;text-align: center;background-color: #62A9E3;color: #ffffff;border: medium hidden;border-radius: 0.1em;box-sizing: border-box;display: none;}
</style>

</head>
<body>

<div id="subjects">
	<form id="yuyue_form">
		<div class="form_ctrl page_head" id="1" title="乳腺癌筛查预约" style="color: white; background-color: gray;">
			<h2>乳腺癌筛查预约</h2>
		</div>
		<div class="form_ctrl page_text" id="2" title="">
			<p>为节省大家宝贵时间，特开始时间预约系统。</p>
		</div>
		<div class="form_ctrl input_text" id="3" title="姓名">
			<label class="ctrl_title">姓名</label>
			<input type="text" name="user" placeholder="请输入姓名">

		</div>
		<div class="form_ctrl input_text" id="4" title="联系电话">
			<label class="ctrl_title">联系电话</label>
			<input name="phone" type="text" size="11" maxlength="11" placeholder="请输入电话号码">
			<span id="messg"></span>
		</div>
		<div class="form_ctrl input_date" id="5" title="就诊日期">
			<label class="ctrl_title">预约日期</label>
			<select name="date_d">
				<option value="0">请选择预约日期</option>
				<option value="1">2016年7月12日</option>
				<option value="2">2016年7月13日</option>
				<option value="3">2016年7月14日</option>
			</select>
		</div>  
		<div class="form_ctrl input_date" id="6" title="就诊时间">
		  	<label class="ctrl_title">预约时间</label>
		  	<select name="date_h">
				<option value="0">请选择预约时间</option>
				<option value="1030">10:30</option>
				<option value="1040">10:40</option>
				<option value="1050">10:50</option>
				<option value="1100">11:00</option>
				<option value="1110">11:10</option>
				<option value="1120">11:20</option>
				<option value="1130">11:30</option>
				<option value="1140">11:40</option>
				<option value="1150">11:50</option>
				<option value="1200">12:00</option>
				<option value="1210">12:10</option>
				<option value="1220">12:20</option>
				<option value="1230">12:30</option>
				<option value="1610">16:10</option>
				<option value="1620">16:20</option>
				<option value="1630">16:30</option>
				<option value="1640">16:40</option>
				<option value="1650">16:50</option>
				<option value="1700">17:00</option>
				<option value="1710">17:10</option>
			</select>
		</div>
		<div class="form_ctrl form_submit" id="9" title="确定预约">
			<input type="button" id="form_but" value="点击按钮预约筛查" style="color: white; background-color: rgb(255, 108, 0);">
		</div>
	</form>	
</div>
<script src="__PUBLIC__/Mobile/js/form.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Mobile/js/jquery.min.js" type="text/javascript"></script>
</body>
</html>
<script type="text/javascript">
$("#form_but").click(function(){
	var user = $("input[name='user']").val();
	var phone = checkphone($("input[name='phone']").val());

	var date_d = $("select[name='date_d'] option:selected").val();
	var date_h = $("select[name='date_d'] option:selected").val();
	
	$.post('{:U("yuyue/bespoke")}',{user:user,phone:phone,date_d:date_d,date_h:date_h},
		function(re){
			console.log();
		},
	'json');	
});


function checkphone(phone){
	var reg =/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
    if(phone == ''){
    	$("#messg").html('<font color="red">手机号码不能为空</font>');
    	return '';
    }
    var my=false;
    if (reg.test(phone))my=true;
    if (!my){
        $("#messg").html('<font color="red">请输入正确的手机号码</font>');
        return '';
    }else{
        return phone;
    }
}
</script>